<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>主要内容区main</title>
    <link href="/SVN/DR/Public/Css/admin/css.css" type="text/css" rel="stylesheet"/>
    <link href="/SVN/DR/Public/Css/admin/main.css" type="text/css" rel="stylesheet"/>
    <link rel="shortcut icon" href="/SVN/DR/Public/Images/admin/favicon.ico"/>
    <script type="text/javascript" src="/SVN/DR/Public/Js/admin/jquery.js"></script>
   <!--  <script type="text/javascript" src="/SVN/DR/Public/Js/admin/jquery.validate.js"></script>
    <script type="text/javascript" src="/SVN/DR/Public/Js/admin/messages_zh.js"></script> -->
 <!--    <script>
        $(function() {
            $("#form").validate({
                rules:{
                    stock:{required:true,digits:true},
                    ct:{required:true,number:true},
                    price:{required:true,digits:true}
                },
                messages:{
                  stock:{required:'不能为空'},
                  ct:{required:'不能为空'},
                  price:{required:'不能为空'}
                }
            });

        });
    </script> -->
    <style>
        body {
            overflow-x: hidden;
            background: #f2f0f5;
            padding: 15px 0px 10px 5px;
        }

        #searchmain {
            font-size: 12px;
        }

        #search {
            font-size: 12px;
            background: #548fc9;
            margin: 10px 10px 0 0;
            display: inline;
            widtd: 100%;
            color: #FFF;
            float: left
        }

        #search form span {
            height: 40px;
            line-height: 40px;
            padding: 0 0px 0 10px;
            float: left;
        }

        #search form input.text-word {
            height: 24px;
            line-height: 24px;
            widtd: 180px;
            margin: 8px 0 6px 0;
            padding: 0 0px 0 10px;
            float: left;
            border: 1px solid #FFF;
        }

        #search form input.text-but {
            height: 24px;
            line-height: 24px;
            widtd: 55px;
            background: url(images/main/list_input.jpg) no-repeat left top;
            border: none;
            cursor: pointer;
            font-family: "Microsoft YaHei", "Tahoma", "Arial", '宋体';
            color: #666;
            float: left;
            margin: 8px 0 0 6px;
            display: inline;
        }

        #search a.add {
            background: url(/SVN/DR/Public/Images/admin/add.jpg) no-repeat -3px 7px #548fc9;
            padding: 0 10px 0 26px;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            font-weight: bold;
            color: #FFF;
            float: right
        }

        #search a:hover.add {
            text-decoration: underline;
            color: #d2e9ff;
        }

        #main-tab {
            border: 1px solid #eaeaea;
            background: #FFF;
            font-size: 12px;
        }

        #main-tab td {
            font-size: 12px;
            height: 32px;
            line-height: 32px;
        }

        #main-tab td {
            font-size: 12px;
            line-height: 40px;
        }

        #main-tab td a {
            font-size: 12px;
            color: #548fc9;
        }

        #main-tab td a:hover {
            color: #565656;
            text-decoration: underline;
        }

        .bordertop {
            border-top: 1px solid #ebebeb
        }

        .borderright {
            border-right: 1px solid #ebebeb
        }

        .borderbottom {
            border-bottom: 1px solid #ebebeb
        }

        .borderleft {
            border-left: 1px solid #ebebeb
        }

        .gray {
            color: #dbdbdb;
        }

        td.fenye {
            padding: 10px 0 0 0;
            text-align: right;
        }

        .bggray {
            background: #f9f9f9
        }
    </style>
</head>
<body>
<!--main_top-->
<table width="99%" border="0" cellspacing="0" cellpadding="0" id="searchmain">
    <tr>
        <td width="99%" align="left" valign="top">您的位置：商品管理</td>
    </tr>
    <tr>
        <td align="left" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="search">
                <tr>
                    <td width="90%" align="left" valign="middle">
                        <form method="post" action="/SVN/DR/index.php/Admin/Goods/goodsSelect">
                            <span>商品：</span>
                            <input type="text" name="name" value="" class="text-word">
                            <a href="/SVN/DR/index.php/Admin/Goods/goodsSelect">查询</a>
                            <!--<input name="" type="submit" value="查询" class="text-but">-->
                        </form>
                    </td>
                    <td width="10%" align="center" valign="middle" style="text-align:right; widtd:150px;"><a
                            href="/SVN/DR/index.php/Admin/Goods/goodsAdd" target="mainFrame" onFocus="tdis.blur()" class="add">添加商品</a></td>
                </tr>
            </table>
        </td>
    </tr>
 <table id="main-tab" width="100%" cellspacing="0" cellpadding="0" border="0">
    <form id="form" method="post" action="/SVN/DR/index.php/Admin/Goods/goodsDetailModifyAction">
        <input type="hidden" name="id" value="<?php echo ($arr["id"]); ?>"/>
        <input type="hidden" name="goods_id" value="<?php echo ($arr["goods_id"]); ?>"/>

       
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">商品属性编号</td>
                <td align="center" valign="middle" class="borderright borderbottom"><?php echo ($arr["id"]); ?></td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">商品id</td>
                <td align="center" valign="middle" class="borderright borderbottom"><?php echo ($arr["goods_id"]); ?></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">库存</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" id="stock" name="stock" value="<?php echo ($arr['stock']); ?>"/>
                    </td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">材质</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="material">
                    <option value="白18K金" <?php if($arr['material'] == 1): ?>selected="selected"<?php endif; ?>>白18K金</option>
                    <option value="PT950" <?php if($arr['material'] == 0): ?>selected='selected'<?php endif; ?>>PT950</option>
                </select>
                </td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石重量</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" name="ct" id="ct" value="<?php echo ($arr["ct"]); ?>"/></td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石颜色</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="color">
                    <option value="D" <?php if($arr['color'] == D): ?>selected='selected'<?php endif; ?>>D</option>
                    <option value="E" <?php if($arr['color'] == E): ?>selected='selected'<?php endif; ?>>E</option>
                    <option value="F" <?php if($arr['color'] == F): ?>selected='selected'<?php endif; ?>>F</option>
                    <option value="G" <?php if($arr['color'] == G): ?>selected='selected'<?php endif; ?>>G</option>
                    <option value="H" <?php if($arr['color'] == H): ?>selected='selected'<?php endif; ?>>H</option>
                    <option value="I" <?php if($arr['color'] == I): ?>selected='selected'<?php endif; ?>>I</option>
                    <option value="J" <?php if($arr['color'] == J): ?>selected='selected'<?php endif; ?>>J</option>
                    <option value="K" <?php if($arr['color'] == K): ?>selected='selected'<?php endif; ?>>K</option>
                </select></td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石净度</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="clarity">
                    <option value="IF">IF</option>
                    <option value="VVS1" <?php if($arr['clarity'] == VVS1): ?>selected='selected'<?php endif; ?>>VVS1</option>
                    <option value="VVS2" <?php if($arr['clarity'] == VVS2): ?>selected='selected'<?php endif; ?>>VVS2</option>
                    <option value="VS1" <?php if($arr['clarity'] == VS1): ?>selected='selected'<?php endif; ?>>VS1</option>
                    <option value="VS2" <?php if($arr['clarity'] == VS2): ?>selected='selected'<?php endif; ?>>VS2</option>
                    <option value="SI1" <?php if($arr['clarity'] == SI1): ?>selected='selected'<?php endif; ?>>SI1</option>
                    <option value="SI2" <?php if($arr['clarity'] == SI2): ?>selected='selected'<?php endif; ?>>SI2</option>

                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石切工</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="cut">
                    <option value="Ideal" <?php if($arr['cut'] == Ideal): ?>selected='selected'<?php endif; ?>>Ideal</option>
                    <option value="EX" <?php if($arr['cut'] == EX): ?>selected='selected'<?php endif; ?>>EX</option>
                    <option value="VG" <?php if($arr['cut'] == VG): ?>selected='selected'<?php endif; ?>>VG</option>
                    <option value="GD" <?php if($arr['cut'] == GD): ?>selected='selected'<?php endif; ?>>GD</option>
                    <option value="Fair" <?php if($arr['cut'] == Fair): ?>selected='selected'<?php endif; ?>>Fair</option>


                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">抛光</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="buffing">
                    <option value="EX" <?php if($arr['buffing'] == EX): ?>selected='selected'<?php endif; ?>>EX</option>
                    <option value="VG" <?php if($arr['buffing'] == VG): ?>selected='selected'<?php endif; ?>>VG</option>
                    <option value="GD" <?php if($arr['buffing'] == GD): ?>selected='selected'<?php endif; ?>>GD</option>
                    <option value="Fair" <?php if($arr['buffing'] == Fair): ?>selected='selected'<?php endif; ?>>Fair</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">对称</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="symmetry">
                    <option value="EX" <?php if($arr['symmetry'] == EX): ?>selected='selected'<?php endif; ?>>EX</option>
                    <option value="VG" <?php if($arr['symmetry'] == VG): ?>selected='selected'<?php endif; ?>>VG</option>
                    <option value="GD" <?php if($arr['symmetry'] == GD): ?>selected='selected'<?php endif; ?>>GD</option>
                    <option value="Fair" <?php if($arr['symmetry'] == Fair): ?>selected='selected'<?php endif; ?>>Fair</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">荧光</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="fluorescence">
                    <option value="NON" <?php if($arr['fluorescence'] == NON): ?>selected='selected'<?php endif; ?>>NON</option>
                    <option value="FNT" <?php if($arr['fluorescence'] == FNT): ?>selected='selected'<?php endif; ?>>FNT</option>
                    <option value="MED" <?php if($arr['fluorescence'] == MED): ?>selected='selected'<?php endif; ?>>MED</option>
                    <option value="STG" <?php if($arr['fluorescence'] == STG): ?>selected='selected'<?php endif; ?>>STG</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">价格</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" name="price" id='price' value="<?php echo ($arr["price"]); ?>"/></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">操作</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="submit" id='sub' value="提交"/>
                    <span class="gray">&nbsp;|&nbsp;</span><input type="reset" value="重置"></td>
            </tr>

</form>
        </table>
    </table>
</body>
</html>
<script>

    $('#sub').click(function(){
        var stock= $.trim($('#stock').val());
        var ct= $.trim($('#ct').val());
        var price= $.trim($('#price').val());
        //alert(stock);
        if (stock && ct && price) {
            $('form').submit();

        }else{
            alert('内容不能为空');
        }
    });


</script>